From d363306235f2a48f16e488f20f73e2233ddcf281 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 29 Nov 2023 18:07:20 +0100 Subject: refactor(pages): improve Homepage * move custom homepage components that does not require props to the MDX file (links should not need to be translated here but where they are defined) * move SEO title and meta desc to MDX file * make Page component the wrapper instead of using a React fragment * fix MDX module types --- src/pages/thematique/[slug].tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/pages/thematique/[slug].tsx') diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 9ea52e1..3d1e966 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -52,7 +52,7 @@ const ThematicPage: NextPageWithLayout = ({ const intl = useIntl(); const { items: breadcrumbItems, schema: breadcrumbSchema } = useBreadcrumb({ title, - url: `${ROUTES.THEMATICS.INDEX}/${slug}`, + url: `${ROUTES.THEMATICS}/${slug}`, }); const { asPath } = useRouter(); @@ -189,8 +189,7 @@ export const getStaticProps: GetStaticProps = async ({ ); const allThematicsLinks = allThematics.filter( (thematic) => - thematic.url !== - `${ROUTES.THEMATICS.INDEX}/${(params as ThematicParams).slug}` + thematic.url !== `${ROUTES.THEMATICS}/${(params as ThematicParams).slug}` ); const translation = await loadTranslation(locale); -- cgit v1.2.3